<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>常见问题 - JIILCHAT</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background: linear-gradient(135deg, #6E85B7, #B2C9E9);
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }

        .container {
            text-align: center;
            background: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
            width: 300px;
            position: relative;
        }

        .title {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 20px;
        }

        .tab-container {
            display: flex;
            justify-content: space-around;
            margin-top: 20px;
        }

        .tab {
            width: 70px;
            height: 70px;
            background: #f9f9f9;
            border-radius: 10px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 12px;
            font-weight: bold;
            cursor: pointer;
            user-select: none;
        }

        .tab:hover {
            background: #f0f0f0;
        }

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            display: none;
            justify-content: center;
            align-items: center;
        }

        .modal {
            background: white;
            padding: 20px;
            border-radius: 10px;
            width: 300px;
            text-align: left;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        }

        .modal h2 {
            margin-top: 0;
            font-size: 18px;
        }

        .modal p {
            margin: 10px 0;
            line-height: 1.5;
            font-size: 14px;
        }

        .close-btn {
            background: #3498db;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
            display: block;
            margin: 20px auto 0;
        }

        .close-btn:hover {
            background: #2980b9;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="title">常见问题：</div>
        <div class="tab-container">
            <div class="tab" onclick="showModal('login')">关于登录</div>
            <div class="tab" onclick="showModal('register')">关于注册</div>
            <div class="tab" onclick="showModal('no-email')">我没有邮箱</div>
        </div>
    </div>

    <div class="modal-overlay" id="modal-overlay">
        <div class="modal">
            <h2 id="modal-title"></h2>
            <p id="modal-content"></p>
            <button class="close-btn" onclick="closeModal()">关闭</button>
        </div>
    </div>

    <script>
        function showModal(type) {
            const modalOverlay = document.getElementById('modal-overlay');
            const modalTitle = document.getElementById('modal-title');
            const modalContent = document.getElementById('modal-content');

            if (type === 'login') {
                modalTitle.textContent = '关于登录';
                modalContent.innerHTML = `
                    1. 我输入了账号密码结果显示错误怎么办？<br>
                    可能是你输入的大小写不一样，请完全输入一样的，确保没有多空格。
                `;
            } else if (type === 'register') {
                modalTitle.textContent = '关于注册';
                modalContent.innerHTML = `
                    1. 无法注册怎么办？<br>
                    如果你输入的信息不符合规范，会有文字提示。如果你点击注册却没有任何反应，
                    可能是服务器无响应或者你的网络有问题。请确保你输入的用户名在十字以内，
                    密码也在十字以内，邮箱也符合规范。
                `;
            } else if (type === 'no-email') {
                modalTitle.textContent = '我没有邮箱';
                modalContent.innerHTML = `
                    如果你没有邮箱，我们允许你直接通过输入五位数字 + @qq.com 就可以注册。<br>
                    例如：<br>
                    52431@qq.com
                `;
            }

            modalOverlay.style.display = 'flex';
        }

        function closeModal() {
            const modalOverlay = document.getElementById('modal-overlay');
            modalOverlay.style.display = 'none';
        }
    </script>
</body>
</html>